package dynamicJsonVerifyer.verifyers;

import com.alibaba.fastjson.JSONObject;

import java.util.Map;

public abstract class FieldTypeVerifyer extends JudgeNullVerifyer {

    public JSONObject getVerifyerMatchData() {
        JSONObject json = new JSONObject();
        json.put("type", getType());
        return json;
    }

    protected abstract String getType();

    protected boolean verifyAny(JSONObject verifyMetadata, Object appointVaildData) {
        if(appointVaildData==null)
            return false;
        return verifyType(verifyMetadata, appointVaildData);
    }

    protected abstract boolean verifyType(JSONObject verifyMetadata, Object appointVaildData);
}
